The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
Euhm me driving a real car is not going to happen, as I have no drivers license Wink
Thanks for your answer and I am sure it will be a great improvement for LFS once you have finished it.
Yisc[NL]
S3 licensed
I know this will be a tricky question and I certainly don't want to force you into saying anything you don't want to say, but would it be possible to give us a quick status update on how the work on the tyre phyiscs is going and maybe a very rough indication on how long the rest of the process should take (although I totaly understand that you might not want to say anything about that last part of the question).
Yisc[NL]
S3 licensed
I am there to be hit Wink
Yisc[NL]
S3 licensed
Ah, never knew about the country thing, something learned today then, thank you.
Yeah, a lot is 'copied' from other people lately, which make me not so keen about helping people too much lately.
Only asking for this and that, not trying anything themselfs and most people aren't grateful when you helped them.
Yisc[NL]
S3 licensed
Quote from VolksTurbo :It could make for taking the distance from the user during all times is connected?

Thanks for answering!

Yes, "Dist" takes the total distance driven by that user on that server.
"SessDist" takes the total distance driven bij that user since it connected to the server and as soon as the user disconnects, the value is wiped.
Yisc[NL]
S3 licensed
I don't want to sound rude, but what have you tried to make these scripts your self?

I mean, number 1 and 3 are extreemly easy to do and even if you have hardly coded anything for Lapper, they are very doable and good examples to learn how to do things within the Lapper environment.
Number 2 can't be done with Lapper, since it can't read an IP address and tie that to a country.

For request one:

Event you need to code this button in: OnConnect
Variable needed: GetCurrentPlayerVar("NickName")

For request three:

Event you need to code this button in: OnLap
Variable needed *: GetCurrentPlayerVar( "Dist" )
Or variable needed *: GetCurrentPlayerVar( "SessDist" )

* first variable gives total distance driven on that server
* second variable gives distance driven during that session
Yisc[NL]
S3 licensed
Great work Scawen and Eric.

I noticed one thing after upgrading our servers to version M.
Insim relay gives this warning:

InSim - TCP : InSim Relay
InSim : version 0 requested - using 6
Yisc[NL]
S3 licensed
I have quickly looked into your request, but don't think it's possible with current version of Lapper, unless someone adds a similar function as GetTopList but then for Drift.
Yisc[NL]
S3 licensed
Quote from Scawen :I'll release that today but first I'll see if there's anything else I can do in time.

Off-topic:

Since you seem to be in a very good mood, would it be possible for you to update the core of LFS Lapper? Uhmm
The last developer seems to have fallen off the earth and I would be over the moon to be able to use all the new toys from within the Lapper environment.
I know your answer though, and can't blame you. Thumbs up

On-topic:

Would it be possible to be able to use more colours through Insim?
Or is that a limitation of Lapper as well?
Yisc[NL]
S3 licensed
That's a normal button, with a transparent background.
Yisc[NL]
S3 licensed
Quote from mikail346 :Could it be a player's registration at only 1 times 1 line?

No, the message means that you either aren't an admin and therefor not allowed to execute the command or that your LFS username isn't listed in the appropriate file.
But once more, these kind of questions don't belong in this topic.
Yisc[NL]
S3 licensed
That means that your username isn't listed in the file called admin.txt
Yisc[NL]
S3 licensed
Quote from k_badam :I personally think that the only thing that should be limited for demo users is online capabilities. They should be limited to 12 hours of track time (only counts when you are on the track) and when that runs out they can choose between paying for more time or buying a license. To stop them from creating another account they shouldn't have to put in any bank details (if i was creating a free account i would find that dubious and would click away) and instead LFS should keep your IP so that no new licenses could be made from that IP.

Getting a new IP is easier then drinking a cup of coffee, so that won't help.
It would be better to get and store some hardware ID and compare that when someone connects.
Yisc[NL]
S3 licensed
Guys, can you please stop all this personal bikkering in this thread?
It won't lead to anything and it's distracting when reading the ongoing developement. @Scawen: Just wanted to take this opportunity to say thanks for your work on LFS. Keep on going.
Yisc[NL]
S3 licensed
when reading through 'changes.txt' I see this about groupcmdlfs:

groupCmdLfs( cmd );
Same command as cmdLfs but send this LFS command to all server having the same group id.

So basicly it let you do the same actions that can be used in 'cmdLfs' but then for the whole group.

As far as I can see, there isn't a way to retrieve information from another instance of Lapper.
Of course you could write some values to the database and then retrieve them from another server.
I've used such thing in my schedule and schedule_set script, so you might want to have a look at those scripts.
Yisc[NL]
S3 licensed
Good to see it's working.
But you don't need to run Lapper twice.
It's possible to run multiple servers while only running Lapper once.
Search for this file: LFSServers.cfg

Then set something like this:

Server1|gr1|127.0.0.1|29998|./default|server1.ini|autoWork
Server2|gr1|127.0.0.1|29999|./default|server2.ini|autoWork

Of course you need to create a seperate ini for each server.
So make copies of "default_1.ini" rename them to "server1.ini" and "server2.ini"
Then adjust those ini-files so that they have the correct password for their corresponding server.
Create seperate "LFSLapper.lpr" if servers need a different configuration.
If not, then you can leave that as it is.
Yisc[NL]
S3 licensed
By the looks of it, the insim port(s) aren't opened on the LFS server(s) or they both use the same port number.
There also seems to be an issue with the password being used, which prevents Lapper from connecting to your LFS server.
Yisc[NL]
S3 licensed
You aren't talking to your self, but I don't feel the need to litter your topic with reactions every time. Great to be able to follow your project so closely. Keep those messages coming please.
Yisc[NL]
S3 licensed
Longtime always seems to be in 12-hour format and setting "TimeFormat = HH:mm;" in the Lapper server config file, makes it crash, so although it's mention in the chances.txt, it doesn't work.

In the end I came up with this script, althoug I doubt if this is enough to measure time for drag racing, since it can only handle full seconds:

CatchEvent OnLapperStart()
OnLapperStart_Node_time();
EndCatchEvent

Sub OnLapperStart_Node_time()
### Declare global variables ###
GlobalVar $splitted_node_1;
GlobalVar $splitted_node_2;

RegisterNodeAction( "Node1", "BL1" , 61 , DisplayTime_Node_1, "" );
RegisterNodeAction( "Node2", "BL1" , 72 , DisplayTime_Node_2, "" );
EndSub

Sub DisplayTime_Node_1( $KeyFlags )
$splitted_node_1 = SplitToArray( getLapperVar( "LongTime" ),":" );
$values_in_array = arrayCount( $splitted_node_1 );

FOR( $i = 0 ; $i < $values_in_array ; $i = $i + 1)
$splitted_node_1[$i] = ToNum( subStr( $splitted_node_1[$i], 0, 2 ) );
ENDFOR
EndSub

Sub DisplayTime_Node_2( $KeyFlags )
$splitted_node_2 = SplitToArray( getLapperVar( "LongTime" ),":" );
$values_in_array = arrayCount( $splitted_node_2 );

FOR( $i = 0 ; $i < $values_in_array ; $i = $i + 1)
$splitted_node_2[$i] = ToNum( subStr( $splitted_node_2[$i], 0, 2 ) );
ENDFOR

$hour=$splitted_node_2[0]-$splitted_node_1[0];
$minutes=$splitted_node_2[1]-$splitted_node_1[1];
$seconds=$splitted_node_2[2]-$splitted_node_1[2];

PrivMsg ( "^7DEBUG: " . $hour . ":" . $minutes . ":" . $seconds );
EndSub

Yisc[NL]
S3 licensed
According to changes.txt two variables are written in lower case only:

6. Added 3 new var setted at end of race or qualification
finishedpos : finish or qualify pos (1 = win / 256 = not added to table)
racetotaltime : race time (ms) use NumToMsh is need
racepbtime : race time (ms) use NumToMsh is need

Sadly this has happened a lot in Lapper, as either the use of variable names in inconsistent and/or the documention is incorrect.
Recently I had to go through the source files to get the correct spelling for a variable.

It also looks like that "racetotaltime" and "racepbtime" are only set at end of race or qualification.
Yisc[NL]
S3 licensed
Quote from Bass-Driver :Maybe it is a stupid question, but i need to know something.

I'm rewriting the dragscript, so that demousers can use the script.
It's because demousers cannot use AutoX editor for placing "Splits", so they must use tracknodes.

To get the time i can use: getLapperVar( "LongTime" ). But is there a Variable that can get the current laptimer? to get milliseconds.

There is a variable to get the laptime: LapTime
And there's a function to get milliseconds: NumToMs
Although it's earlier called "NumToMSH" in the changelog.
Yisc[NL]
S3 licensed
Pitboard - V2.10 (information screen about split times, gaps in front and behind you, ect)

Ctrack - V1.09 (tool to change the loaded track of an LFS server)


Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.

To be able to use Ctrack properly, you also need an updated version of trackList.cfg which is also included in this message.
Change the extension to .cfg and put it in the bin-folder of Lapper.
Restart Lapper to activate the new file(s).
Yisc[NL]
S3 licensed
Yes, then the sourcecode have to be adjusted.
Yisc[NL]
S3 licensed
It could well be the case that cleanspb doesn't work, although I think it's not related to a recorded time, but only to the best time in that particular session.
Documententation says this about it: /cleanspb -> Clean your current session of Spb

A while ago I had a struggle with flagconfirm and then finaly found out how that is working.
First you need to know this:

const CONF_MENTIONED 1;
const CONF_CONFIRMED 2;
const CONF_PENALTY_DT 4;
const CONF_PENALTY_SG 8;
const CONF_PENALTY_30 16;
const CONF_PENALTY_45 32;
const CONF_DID_NOT_PIT 64;

Then I made this code:


CatchEvent OnResult( $userName,$flagConfirm ) # Player event
IF( ( $flagConfirm & 2 ) == CONF_CONFIRMED )
THEN
SetCurrentPlayerVar( "race_status","off" );
$plyNum_finished=$plyNum_finished+1;
ENDIF

IF( ( $flagConfirm & 16 ) == CONF_PENALTY_30 )
THEN
GlobalMsg ( "^3INFO: " . GetCurrentPlayerVar( "NickName") . "^7 is fined for 5 euros" );
$new_player_bank_saldo = GetCurrentPlayerVar( "player_bank_saldo" ) - 5;
SetCurrentPlayerVar( "player_bank_saldo",ToNum( $new_player_bank_saldo ) );
SetStoredValue( $userName . "player_bank_saldo", GetCurrentPlayerVar( "player_bank_saldo" ) );
$prices=$prices+5;
ENDIF

IF( ( $flagConfirm & 32 ) == CONF_PENALTY_45 )
THEN
GlobalMsg ( "^3INFO: " . GetCurrentPlayerVar( "NickName") . "^7 is fined for 10 euros" );
$new_player_bank_saldo = GetCurrentPlayerVar( "player_bank_saldo" ) - 10;
SetCurrentPlayerVar( "player_bank_saldo",ToNum( $new_player_bank_saldo ) );
SetStoredValue( $userName . "player_bank_saldo", GetCurrentPlayerVar( "player_bank_saldo" ) );
$prices=$prices+10;
ENDIF

IF( ( $flagConfirm & 4 ) == CONF_PENALTY_DT )
THEN
GlobalMsg ( "^3INFO: " . GetCurrentPlayerVar( "NickName") . "^7 is fined for 15 euros" );
$new_player_bank_saldo = GetCurrentPlayerVar( "player_bank_saldo" ) - 15;
SetCurrentPlayerVar( "player_bank_saldo",ToNum( $new_player_bank_saldo ) );
SetStoredValue( $userName . "player_bank_saldo", GetCurrentPlayerVar( "player_bank_saldo" ) );
$prices=$prices+15;
ENDIF

IF( ( $flagConfirm & 8 ) == CONF_PENALTY_SG )
THEN
GlobalMsg ( "^3INFO: " . GetCurrentPlayerVar( "NickName") . "^7 is fined for 20 euros" );
$new_player_bank_saldo = GetCurrentPlayerVar( "player_bank_saldo" ) - 20;
SetCurrentPlayerVar( "player_bank_saldo",ToNum( $new_player_bank_saldo ) );
SetStoredValue( $userName . "player_bank_saldo", GetCurrentPlayerVar( "player_bank_saldo" ) );
$prices=$prices+20;
ENDIF

SetStoredValue( "RFM_" . "prices", $prices );
DelayedCommand( 60, Finish_price );
EndCatchEvent

Of course the actions within each IF-statement, are of no use for you, but you can replace them with the things you want to happen.
And no, this won't have effect on the laptimes that Lapper will record, so you need to start storing your own values.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
I don't know how to adjust that, but do know that I made an improved toptable at some point Smile
See this posting: https://www.lfs.net/forum/post/1883528#post1883528
FGED GREDG RDFGDR GSFDG